package com.kingsoft.dc.khaos.listener

/**
  * Created by chengguangqing on 2019/5/28.
  */
trait TKhaosListener {

  def onApplicationStart(applicationStart: KhaosListenerApplicationStart):Unit
  def onApplicationEnd(applicationEnd: KhaosListenerApplicationEnd):Unit

  def onJobStart(jobStart:KhaosListenerJobStart):Unit
  def onJobEnd(jobEnd: KhaosListenerJobEnd):Unit

  def onTaskStart(taskStart: KhaosListenerTaskStart):Unit
  def onTaskEnd(taskEnd: KhaosListenerTaskEnd): Unit

}

abstract class KhaosListener extends TKhaosListener{

  override def onApplicationStart(applicationStart: KhaosListenerApplicationStart): Unit = {}

  override def onApplicationEnd(applicationEnd: KhaosListenerApplicationEnd): Unit = {}

  override def onJobStart(jobStart: KhaosListenerJobStart): Unit = {}

  override def onJobEnd(jobEnd: KhaosListenerJobEnd): Unit = {}

  override def onTaskStart(taskStart: KhaosListenerTaskStart): Unit = {}

  override def onTaskEnd(taskEnd: KhaosListenerTaskEnd): Unit = {}
}
